package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.entity.PickGoods;
import com.woniuxy.mapper.PickGoodsMapper;
import com.woniuxy.service.PickGoodsSevice;
import com.woniuxy.service.UnpackService;
@Service
public class PickGoodsServiceImpl implements PickGoodsSevice{
	
	@Autowired
	private PickGoodsMapper pickGoodsMapper;
	@Autowired
	private UnpackService unpackService;
	@Override
	public List<PickGoods> all() {
		
		return pickGoodsMapper.all();
	}

	@Override
	public int addPickGoods(PickGoods pickGoods) {
		
		return pickGoodsMapper.addPickGoods(pickGoods);
	}

	@Override
	public int deletePickGoods(int cgid) {
		unpackService.updateCgid(cgid);
		return pickGoodsMapper.deletePickGoods(cgid);
		
	}

	@Override
	public int updatePickGoodsStatus(int cgid) {
		
		return pickGoodsMapper.updatePickGoodsStatus(cgid);
	}

}
